#include "intlist.h"

void create_IntList(Element *intA, const Element intB)
{
  int **a = (int **)intA;
  int *b = (int *)intB;
  (*a) = (int *) malloc(sizeof(int));
  (*a)[0] = (*b);
}

void destroy_IntList(Element *intA)
{
  int **a = (int **)intA;
  free((*a));
  (*a) = NULL;
}

ListReturn compare_IntList(const Element a, const Element b)
{
  int *aa = (int *)a;
  int *bb = (int *)b;
  if((*bb) == (*aa))
    return LIST_COMP_EQ;
  return LIST_COMP_DIF;
}

void print_IntList(const Element a)
{
  int *aa = (int *)a;
  printf("%d ", *aa);
}
